<extend name="Base:common" />
<block name="static">
<link rel="stylesheet" href="__CSS__/goodsdetails.css" />
<link rel="stylesheet" href="__CSS__/pslocation.css" />
<link rel="stylesheet" href="__CSS__/magnifier.css" />
<script src="__PUBLIC__/js/jquery.min.js"></script>
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<style>
	.des-chux{font-size:16px;}
	.redeemok{font-size: 20px;padding:10px 40px;background: RGB(251,79,28);color:white;}
	.redeemno{font-size: 20px;padding:10px 40px;background: RGB(150,150,150);color: RGB(200,200,200);}
</style>
</block>
<block name="body">
		<input id="shopId" type="hidden" value="{$goodsDetails['shopId']}"/>
		<input id="goodsId" type="hidden" value="{$goodsDetails['goodsId']}"/>
		
		<div class="wst-container">
			<div class="wst-nvg-title">
				<a href="http://www.o2otmall.com">首页</a>&nbsp;>&nbsp;
				<a href="{:U('Home/Integral/index/',array('c1Id'=>$goodsNav[0]['catId'],'c2Id'=>$goodsNav[1]['catId']))}">{$cat['catName']}</a>
				
			</div>
			<div class="wst-goods-details">
				<div class="details-left">
					<div class="goods-img-box">
						 <!--产品参数开始-->
						  <div>
						    <div id="preview" class="spec-preview"> 
							    <span class="jqzoom">
							    	<img jqimg="__ROOT__/{$goodsDetails['goodsImg']}" src="__ROOT__/{$goodsDetails['goodsImg']}" height="350" width="350"/>
							    </span> 
						    </div>
						    <!--缩图开始-->
						    <div class="spec-scroll"> <a class="prev">&lt;</a> <a class="next">&gt;</a>
						      <div class="items">
						        <ul>
						        	<li><img alt="" bimg="__ROOT__/{$goodsDetails['goodsImg']}" src="__ROOT__/{$goodsDetails['goodsImg']}" onmousemove="preview(this);"></li>
						        	<volist name="goodsImgs" key="k" id="vo">
						          		<li><img alt="" bimg="__ROOT__/{$vo['goodsImg']}" src="__ROOT__/{$vo['goodsImg']}" onmousemove="preview(this);"></li>
						          	</volist>
						        </ul>
						      </div>
						    </div>
						    <!--缩图结束-->
						  </div>
						  <!--产品参数结束-->
						  <div class='wst-short-tool'>
						       <div style='float:left;'>商品编号：{$goodsDetails["goodsSn"]}</div>
						       <!--
						       <div style='float:right;'>
						         <a href='javascript:favoriteGoods({$goodsDetails['goodsId']})'>
						         <b></b>
						         <span id='f0_txt' f='{$favoriteGoodsId}'>
						         <if condition="$favoriteGoodsId gt 0">已关注<else/>关注商品</if>
						         </span>
						         </a>
						       </div>
						       -->
						  </div>
					</div>
					<div class="goods-des-box">
						<table class="goods-des-tab">
							<tbody>
								<tr>
									<td colspan="2">
										<div class="des-title" style="word-break:break-all;font-size:20px;">
											{$goodsDetails["goodsName"]}
										</div>
										<div class='wst-goods-spec'>{$goodsDetails["goodsSpec"]|htmlspecialchars_decode}</div>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<div class="des-chux">
											兑换价格：<span id='shopGoodsPrice_{$goodsDetails["goodsId"]}' dataId='{$goodsDetails["goodsAttrId"]}'>{$goodsDetails["shopPrice"]}积分</span>
										</div>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<div class="des-chux" >
											市场价格：<span id='shopGoodsPrice_{$goodsDetails["goodsId"]}' dataId='{$goodsDetails["goodsAttrId"]}' style="TEXT-DECORATION: line-through">￥{$goodsDetails["marketPrice"]}</span>
										</div>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<div class="des-chux">
											库存情况：<if condition="$goodsDetails['goodsStock'] gt 0">有货
											<else />无货</if>
										</div>
									</td>
								</tr>
								<tr>
									<td style="font-size: 16px;width:100px;padding:5px 0 0 20px;font-weight: bold">兑换数量：</td>
									<td>
											<div class="goods-buy-cnt">
												<div class="buy-cnt-plus" onclick="changebuynum(1)"></div>
												<input id="buy-num" type="text" class="buy-cnt-txt" value="1" maxVal="{$goodsDetails['goodsStock']}" maxlength="3" onkeypress="return WST.isNumberKey(event);" onkeyup="changebuynum(0);" autocomplete="off"/>
												<div class="buy-cnt-add" onclick="changebuynum(2)"></div>
											</div>
										<!--<div class="des-chux">
											兑换数量：1&nbsp;&nbsp;&nbsp;<span style="color:gray;font-size: 12px">每日限兑1件</span>
										</div>-->
										<td>
										</td>
									</td>
								</tr>							
								<tr>
									<td></td>
									<td></td>
								</tr>
								
								<tr>
									<td width="70"></td>
									<td>
										<!--每日限兑一件
										<if condition="$goodsDetails['goodsStock'] gt 0">
										<if condition="$goodsDetails['already'] neq 1">
										<a href="{:U('Home/IntegralOrders/checkOrder',array('goodsId'=>$goodsDetails['goodsId']))}" class="btn2Cart"><span class='redeemok'>立即兑换</span></a>
										<else />
											<span class='redeemno'>当日已兑</span>
										</if>
										<else/>
											<span class='redeemno'>立即兑换</span>
										</if>
										-->
										<if condition="$goodsDetails['goodsStock'] gt 0">
										<a href="javascript:exchange({$goodsDetails['goodsId']})" class="btn2Cart"><span class='redeemok'>立即兑换</span></a>
										<else/>
											<span class='redeemno'>立即兑换</span>
										</if>
									</td>
								</tr>
								
							</tbody>
						</table>
						
					</div>
				</div>
				<!--右侧店铺信息
				<div class="details-right">
					<table class="details-tab">
						<tbody>
							<tr>
								<td class="title">店铺名称：</td>
								<td>{$CONF['mallName']}</td>
							</tr>
						
							<tr>
								<td class="title">营业时间：</td>
								<td>{$goodsDetails['serviceStartTime']}-{$goodsDetails['serviceEndTime']}</td>
							</tr>
							<tr>
								<td class="title">配送说明：</td>
								<td>{$goodsDetails["deliveryStartMoney"]}元起，配送费{$goodsDetails["deliveryMoney"]}元<br/>{$goodsDetails["deliveryFreeMoney"]}元起免配送费<br/><br/></td>
							</tr>
							<tr>
								<td class="title">店铺地址：</td>
								<td>{$goodsDetails['shopAddress']}</td>
							</tr>
							<tr>
								<td class="title">店铺电话：</td>
								<td>{$goodsDetails['shopTel']}</td>
							</tr>
							<if condition="$goodsDetails['qqNo'] neq ''">
							<tr>
								<td class="title">&nbsp;QQ咨询：</td>
								<td>
									<a href="tencent://message/?uin={$goodsDetails['qqNo']}&Site=QQ交谈&Menu=yes">
									<img border="0" src="http://wpa.qq.com/pa?p=1:{$goodsDetails['qqNo']}:7" alt="QQ交谈" width="71" height="24" />
									</a><br/>
								</td>
							</tr>
							</if>
							<tr>
								<td ></td>
								<td></td>
							</tr>
							<tr>
								<td colspan="2" class="wst-shop-eval">
									<div class="shop-eval-box" style="width:220px;margin:0 auto;">
										    <li>商品<br/>{$shopScores["goodsScore"]}</li>
											<li class="li-center">时效<br/>{$shopScores["timeScore"]}</li>
											<li>服务<br/>{$shopScores["serviceScore"]}</li>
										<div class="wst-clear"></div>
									</div>
								</td>
							</tr>
							<tr>
								<td ></td>
								<td></td>
							</tr>
							<tr>
								<td colspan="2" class="wst-shop-eval">
									<div class="shop-eval-box" style="width:214px;margin:0 auto;">
										<a class='wst-shop-btn' href="{:U('Home/Shops/toShopHome/',array('shopId'=>$goodsDetails['shopId']))}">
										进入店铺
										</a>
										<a class='wst-shop-btn' href="javascript:favoriteShops({$goodsDetails['shopId']})">
										<span id='f1_txt' f='{$favoriteShopId}'><if condition="$favoriteShopId gt 0">已关注<else/>关注店铺</if></span>
										</a>
									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
				-->
				<div class="wst-clear"></div>
			</div>
			
			<div class="wst-goods-pdetails">
				<div class="wst-goods-pdetails-left">
					{:W('Goods/getHotGoods',array('shopId'=>$goodsDetails['shopId']))}
					{:W('Goods/getViewGoods')}
				</div>
				<div id="wst-goods-pdetails-right" class="wst-goods-pdetails-right">
					<div class="goods-nvg">
						<ul class="tab">
							<li onclick="tabs('#wst-goods-pdetails-right',0)" class="curr">商品介绍</li>
							<if condition=" count($goodsAttrs['attrs']) gt 0">
							<li onclick="tabs('#wst-goods-pdetails-right',1)">商品属性</li>
							</if>
						</ul>
						<div class="wst-clear"></div>
					</div>
					<div class="tabcon">
						<div id="wst_goods_desc" style="font-weight:bolder;height:auto;line-height:30px;padding-left:8px;">
						{$goodsDetails["goodsContent"]}
						</div>
					</div>
					<if condition=" count($goodsAttrs['attrs']) gt 0">
					<div class="tabcon" style="display:none;">
						<table class='wst-attrs-list'>
						  <volist name="goodsAttrs['attrs']" id="vo">
						  <if condition="$vo['attrContent'] !='' ">
						  <tr>
						    <th nowrap>{$vo['attrName']}：</th>
						    <td>{$vo['attrContent']}</td>
						  </tr>
						  </if>
						  </volist>
						</table>
					</div>
					</if>
					<div class="tabcon"  style="display:none;">						
						<table id="appraiseTab" width="100%">
							<tr>
								<td>
		                      	 	<div style="margin-top: 10px;" id="allgoodsppraises">
		                           		 请稍等...
		                        	</div>
		                        </td>
		                	</tr>
	                   	</table>  
	                   	<div id="wst-page-items" style="text-align:center;margin-top:5px;"></div>                  
					</div>
					<div class="wst-clear"></div>
				</div>
				<div class="wst-clear"></div>
			</div>
			<div class="wst-clear"></div>
		</div>
</block>
<block name="footer_static">
<script src="__JS__/goods.js"></script>
<script src="__JS__/pslocation.js" type="text/javascript"></script>
<script src="__JS__/jquery.jqzoom.js" type="text/javascript"></script>
<script src="__JS__/magnifier.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/qrcode.js"></script>
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<script src="__JS__/cartpaylist.js"></script>   	
<script> 
$("#store-selector").hover(function() {
}, function(){
	$("#store-selector").removeClass("hover");
});


$(function(){
	var qr = qrcode(10, 'M');
	qr.addData("{$qrcode}");
	qr.make();
	$('#qrcode').html(qr.createImgTag());
	getGoodsappraises({$goodsDetails["goodsId"]},0);
	$("#wst_goods_desc img").each(function(){
		if($(this).width()>940){
			$(this).width(940);
		}
	});
});
</script>
</block>


